#!/bin/bash

if [[ -z "$1" ]] || [[ "$1" == "--help" ]]
then
	echo "Usage: utils/generate_first.in [end_range]"
	echo "           generate a first.in file, containing 1 to end_range in each line."
	echo "       utils/generate_first.in [start_range] [end_range]"
	echo "           generate a first.in file, containing start_range to end_range in each line."
	exit 0
fi

if [ -z "$2" ]
then
	start=1
	end="$1"
else
	start="$1"
	end="$2"
fi

seq "$start" "$end" > first.in

./build/main <first.in >first.out

ls -sh first.out
